package aerolineasYVuelosDaos

import aerolineasYVuelos.SessionManager

abstract class ManagerDAO[T] {
	 
  val persistentClass = this.getDomainClass
  def getDomainClass: Class[T]
  
  def get(id:Int): T = SessionManager.getSession.get(this.persistentClass, id).asInstanceOf[T]
  
  def save(t: T) = SessionManager.getSession.saveOrUpdate(t)
}